#include <bits/stdc++.h>

using namespace std;

#define int long long

void solve()
{
    int n, j, k;
    cin >> n >> j >> k;
    vector<int>a(n + 1);
    int mx = 0;
    for(int i = 1;i <= n;i ++)
    {
        cin >> a[i];
        mx = max(a[i] , mx);
    }
    if(k > 1 || a[j] == mx) cout << "Yes" << endl;
    else cout << "No" << endl;

}
signed main()
{
    int t; cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}